﻿namespace Ngs.MetaData
{
    public abstract class MetaObject : IMetaData
    {
        private string name;

        protected MetaObject(string name)
        {
            this.Name = name;
        }

        public string Name
        {
            get { return this.name; }
            set
            {
                this.name = value;
                this.OnSetName(value);
            }
        }

        public MetaType MetaDataType { get; protected set; }

        public override string ToString()
        {
            return this.Name;
        }

        protected virtual void OnSetName(string value)
        {
        }
    }
}
